﻿using TjZheng.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using TjZheng.Framework;
using TjZheng.Controls;

namespace TjZheng.UpLoad
{
    public static partial class UpLoadifyExtension
    {
        /// <summary>
        /// 单图片上传控件 jquery.uploadify.js
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="ulid">限制码Id</param>
        /// <param name="name">隐藏的Name属性</param>
        /// <param name="value">隐藏的Value值</param>
        /// <returns></returns>
        public static MvcHtmlString UpLoadImage(this HtmlHelper htmlHelper, long ulid, string name, string value)
        {
            return htmlHelper.UpLoadify(new UpLoadSet { ULId = ulid, Name = name, Value = value });
        }
        /// <summary>
        /// 单图片上传控件 jquery.uploadify.js
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="ulid">限制码Id</param>
        /// <param name="name">隐藏的Name属性</param>
        /// <param name="value">隐藏的Value值</param>
        /// <param name="fileName">传回服务端的Name值</param>
        /// <returns></returns>
        public static MvcHtmlString UpLoadImage(this HtmlHelper htmlHelper, long ulid, string name, string value, string fileName)
        {
            return htmlHelper.UpLoadify(new UpLoadSet { ULId = ulid, Name = name, Value = value, FileName = fileName });
        }
        /// <summary>
        /// 单图片上传控件 jquery.uploadify.js
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="ulid">限制码Id</param>
        /// <param name="name">隐藏的Name属性</param>
        /// <param name="value">隐藏的Value值</param>
        /// <param name="fileName">传回服务端的Name值</param>
        /// <param name="url">上传地址</param>
        /// <returns></returns>
        public static MvcHtmlString UpLoadImage(this HtmlHelper htmlHelper, long ulid, string name, string value, string fileName, string url)
        {
            return htmlHelper.UpLoadify(new UpLoadSet { ULId = ulid, Name = name, Value = value, FileName = fileName, Url = url });
        }
        /// <summary>
        /// 单图片上传控件 jquery.uploadify.js
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="categoryCode">资源码</param>
        /// <param name="limitCode">限制码</param>
        /// <param name="name">隐藏的Name属性</param>
        /// <param name="value">隐藏的Value值</param>
        /// <returns></returns>
        public static MvcHtmlString UpLoadImage(this HtmlHelper htmlHelper, string categoryCode, string limitCode, string name, string value)
        {
            return htmlHelper.UpLoadify(new UpLoadSet { CategoryCode = categoryCode, LimitCode = limitCode, Name = name, Value = value });
        }
        /// <summary>
        /// 单图片上传控件 jquery.uploadify.js
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="categoryCode">资源码</param>
        /// <param name="limitCode">限制码</param>
        /// <param name="name">隐藏的Name属性</param>
        /// <param name="value">隐藏的Value值</param>
        /// <param name="fileName">传回服务端的Name值</param>
        /// <returns></returns>
        public static MvcHtmlString UpLoadImage(this HtmlHelper htmlHelper, string categoryCode, string limitCode, string name, string value, string fileName)
        {
            return htmlHelper.UpLoadify(new UpLoadSet { CategoryCode = categoryCode, LimitCode = limitCode, Name = name, Value = value, FileName = fileName });
        }
        /// <summary>
        /// 单图片上传控件 jquery.uploadify.js
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="categoryCode">资源码</param>
        /// <param name="limitCode">限制码</param>
        /// <param name="name">隐藏的Name属性</param>
        /// <param name="value">隐藏的Value值</param>
        /// <param name="fileName">传回服务端的Name值</param>
        /// <param name="url">上传地址</param>
        /// <returns></returns>
        public static MvcHtmlString UpLoadImage(this HtmlHelper htmlHelper, string categoryCode, string limitCode, string name, string value, string fileName, string url)
        {
            return htmlHelper.UpLoadify(new UpLoadSet { CategoryCode = categoryCode, LimitCode = limitCode, Name = name, Value = value, FileName = fileName, Url = url });
        }
    }
}